package com.mind.db;

import java.util.List;
import java.util.Map;


public interface IDao<T extends IEntity>{
	public boolean insert(T obj);

	public boolean insert(List<T> list);
	
	public T findOne(String id);

	public boolean update(T obj);
	/**
	 * Update an entity, with new key/value pairs.
	 * 
	 * @param id
	 *            the entity's id
	 * @param values
	 *            the new key/value pairs
	 */
	public boolean update(String id, Map values);

	/**
	 * Count all entity.
	 * 
	 * @return
	 */
	public long count();

}